package com.barunsw.bwf.docu_server.board;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class BoardServiceImpl implements BoardService {
	
	@Autowired
	BoardDao boardDao;
	
	@Override
	public int getTotalCount() throws Exception {
		return boardDao.getTotalCount();
	}
	
	@Override
	public List<BoardVo> getBoardList(int startPos, int endPos) throws Exception {
		return boardDao.getBoardList(startPos, endPos);
	}

	@Override
	public List<BoardVo> getSearchList(String searchKey, String search,String dateOption) throws Exception {
		return boardDao.getSearchList(searchKey, search, dateOption);
	}

	@Override
	public int insertContent(BoardVo boardVo) throws Exception {
		boardDao.insertContent(boardVo);
		return 0;
	}

	@Override
	public BoardVo getReadContent(String seq) throws Exception {
		return boardDao.getReadContent(seq);
	}

	@Override
	public int deleteContent(String seq) throws Exception {
		return boardDao.deleteContent(seq);
	}

	@Override
	public int updateReadCount(String seq) throws Exception {
		return boardDao.updateReadCount(seq);
	}
}
